package cn.south.campus.admin.sys.model.entity;

import cn.south.campus.common.model.entity.BaseEntity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @author chow
 * @since 2024/10/31
 */
@EqualsAndHashCode(callSuper = true)
@Data
@TableName("sys_user")
public class SysUser extends BaseEntity {


    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 昵称
     */
    @TableField("username")
    private String username;

    /**
     * 头像
     */
    @TableField("avatar")
    private String avatar;

    /**
     * 电话号码
     */
    @TableField("mobile")
    private String mobile;

    /**
     * 邮箱
     */
    @TableField("email")
    private String email;

    /**
     * 密码
     */
    @TableField("password")
    private String password;
    /**
     * 角色
     */
    @TableField("role_id")
    private Long roleId;
    /**
     * 角色名称
     */
    @TableField(exist = false)
    private String roleName;

    /**
     * 部门ID
     */
    @TableField("dept_id")
    private Long deptId;
    /**
     * 部门名称
     */
    @TableField(exist = false)
    private String deptName;

    /**
     * 1有效  2无效
     */
    @TableField("locked")
    private Integer locked;

}
